<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="utf-8"/>
    <title>控制台</title>
    <meta name="keywords" content="{$Think.CONFIG.keywords}"/>
    <meta name="description" content="{$Think.CONFIG.description}"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <include file="Public/head"/>
</head>
<body class="no-skin">
<div class="main-container" id="main-container">
    <script type="text/javascript">        try {
        ace.settings.check('main-container', 'fixed')
    } catch (e) {
    }    </script>
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th class="center">#</th>
                                <th>用户</th>
                                <th>时间</th>
                                <th>IP</th>
                                <th class="col-xs-7">日志内容</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="list" id="val">
                                <tr>
                                    <td>{$val['id']}</td>
                                    <td>{$val['name']}</td>
                                    <td>{$val['t']|date="Y-m-d H:i:s",###}</td>
                                    <td>{$val['ip']}</td>
                                    <td>{$val['log']}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        {$page}                        <!-- PAGE CONTENT ENDS -->                    </div>
                    <!-- /.col -->                </div><!-- /.row -->            </div><!-- /.page-content --></div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>
</div><!-- /.main-container -->
<include file="Public/footerjs"/><!-- inline scripts related to this page -->
<script type="text/javascript">    $(function () {
    $("#officialnews ul").html('<div class="ace-icon fa fa-spinner fa-spin orange"></div>');
    $.ajax({
        type: 'GET', url: '{$Think.CONFIG.NEWS_URL}?callback=?', success: function (data) {
            $("#officialnews ul").html("");
            $.each(data.news, function (i, news) {
                $("#officialnews ul").append("<li>" + news.pre + "<a href=\"" + news.url + "\" title=\"" + news.title + "\" target=\"_blank\">" + news.title + "</a>" + news.time + "</li>");
            });
        }, error: function () {
            $("#officialnews ul").html("服务器不可用，请稍后再试！");
        }, dataType: 'json'
    });
    $("#update").click(function () {
        $("#upmsg").html("");
        $("#upmsg").addClass("ace-icon fa fa-refresh fa-spin blue");
        $.ajax({
            type: 'GET',
            url: '{$Think.CONFIG.UPDATE_URL}?v=<?php echo THINK_VERSION ?>&callback=?',
            success: function (json) {
                if (json.result == 'no') {
                    $("#upmsg").html("目前还没有适合您当前版本的更新！").removeClass();
                } else if (json.result == 'yes') {
                    $("#upmsg").html("检查到新版本 " + json.ver + "，请前往“系统设置”->“<a  href=\"{:U('Update/update')}\">在线升级</a>”").removeClass();
                }
            },
            error: function () {
                $("#upmsg").html("悲剧了，网络故障，请稍后再试！").removeClass();
            },
            dataType: 'json'
        });
    });
})
$(function () {
    $(".btn-info.submit").click(function () {
        var content = $("#content").val();
        if (content == '') {
            bootbox.dialog({
                title: '友情提示：',
                message: "反馈内容必须填写。",
                buttons: {"success": {"label": "确定", "className": "btn-danger"}}
            });
            return;
        }
        $("#form").submit();
    });
});</script>
</body>
</html>